package de.iritgo.skillfull.director;

import de.iritgo.skillfull.director.attacktype.EndgameAttackWithSpeeder;
import de.iritgo.skillfull.director.attacktype.HardAttack;
import de.iritgo.skillfull.director.attacktype.HardAttackWithSpeeder;
import de.iritgo.skillfull.director.attacktype.LowAttack;
import de.iritgo.skillfull.director.attacktype.LowAttackWithSpeeder;


/**
 * The attack strategy use the state pattern. It handle the player strange and make the
 * game easer or harder.
 * 
 * @author held
 *
 */
public class AttackStrategy 
{
	private int enemies = -1;
	
	private HardAttack hardAttack = new HardAttack (this);
	private LowAttack lowAttack = new LowAttack (this);

	private HardAttackWithSpeeder hardAttackWithSpeeder = new HardAttackWithSpeeder (this);
	private LowAttackWithSpeeder lowAttackWithSpeeder = new LowAttackWithSpeeder (this);
	
	private EndgameAttackWithSpeeder endgameAttackWithSpeeder = new EndgameAttackWithSpeeder (this);

	private AttackType currentAttackType = lowAttack;
	
	public void setAttackType (AttackType attackType)
	{
		this.currentAttackType = attackType;
	}
	
	public void attackLeft (int heroHealth, int timeLeft)
	{
		enemies += currentAttackType.attackLeft (heroHealth, enemies, timeLeft);
	}

	public void attackRight (int heroHealth, int timeLeft)
	{
		enemies += currentAttackType.attackRight (heroHealth, enemies, timeLeft);
	}

	public void attackTop (int heroHealth, int timeLeft)
	{
		enemies += currentAttackType.attackTop (heroHealth, enemies, timeLeft);
	}

	public void attackBottom (int heroHealth, int timeLeft)
	{
		enemies += currentAttackType.attackBottom (heroHealth, enemies, timeLeft);
	}

	public HardAttack getHardAttack () 
	{
		return hardAttack;
	}

	public LowAttack getLowAttack () 
	{
		return lowAttack;
	}

	public void enemyKilled () 
	{
		enemies = enemies -1;
	}

	public AttackType getLowAttackWithSpeeder() 
	{
		return lowAttackWithSpeeder;
	}

	public HardAttackWithSpeeder getHardAttackWithSpeeder() 
	{
		return hardAttackWithSpeeder;
	}

	public EndgameAttackWithSpeeder getEndgameAttackWithSpeeder() 
	{
		return endgameAttackWithSpeeder;
	}
	
	
	
}
